import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AuthGurdService } from '../service/auth-gurd.service';
import { HomeComponent } from './home.component';
const routes: Routes = [
  {
    path: 'index', canActivate: [AuthGurdService], component: HomeComponent,
    canActivateChild: [AuthGurdService],
    children: [
      {path: 'equipment', loadChildren: '../equipment/equipment.module#EquipmentModule'},
      {path: 'inspection', loadChildren: '../inspection/inspection.module#InspectionModule'},
      {path: 'report', loadChildren: '../report/report.module#ReportModule'},
      {path: 'duty', loadChildren: '../duty/duty.module#DutyModule'},
      {path: 'inventory', loadChildren: '../inventory/inventory.module#InventoryModule'},
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class HomeRoutingModule { }
